<template>
    <div>
        我是首页页面
        <cpn :msgs="msg" @getsondata="getTang"></cpn>
        <div @click="getSonFun">
            <cpn ref="son"></cpn>
        </div>
    </div>
</template>

<script>
import cpn from './components/cpn.vue'
export default {
    data(){
        return {
            msg:"我是王发发"
        }
    },
    components:{
        cpn
    },
    methods:{
        getTang(val){
            console.log(val)
        },
        getSonFun(){
            this.$refs.son.sonfun()
        }
    }
}
</script>

<style>

</style>